﻿<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" 
    x:Class="Twatcher.App"
    >

    <!--Application Resources-->
    <Application.Resources>
    	<DataTemplate x:Key="TagTweetTemplate">
    		<Grid Width="456" Height="120" Background="#4C000000">
    			<Grid.ColumnDefinitions>
    				<ColumnDefinition Width="0.25*"/>
    				<ColumnDefinition Width="0.8*"/>
    			</Grid.ColumnDefinitions>
    			<Border BorderBrush="#7FFFFFFF" BorderThickness="1" Grid.ColumnSpan="2"/>
    			<Image x:Name="twUsrImg" Margin="5" Stretch="UniformToFill" Source="{Binding profile_image_url}"/>
    			<StackPanel Margin="2,0,1,0" Grid.Column="1">
    				<Grid Background="#4CFFFFFF" Margin="5" VerticalAlignment="Top" Height="18">
    					<Grid.ColumnDefinitions>
    						<ColumnDefinition Width="0.683*"/>
    						<ColumnDefinition Width="0.317*"/>
    					</Grid.ColumnDefinitions>
						<Border BorderBrush="Black" BorderThickness="1" Grid.Column="0"/>
    					<TextBlock x:Name="twUsrBox" TextWrapping="Wrap" FontSize="16" Margin="10,0,0,0" Text="{Binding from_user}" HorizontalAlignment="Left" VerticalAlignment="Center"/>
    					<Border BorderBrush="#7F000000" BorderThickness="1" Grid.Column="1"/>
    					<TextBlock x:Name="twDateBox" TextWrapping="Wrap" FontSize="10.667" Text="{Binding created_at}" Margin="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right"/>
    				</Grid>
    				<StackPanel Margin="5,0,5,5" Background="#4CFFFFFF" Height="85">
    					<TextBlock x:Name="twTweetsBox" TextWrapping="Wrap" FontSize="16" Margin="3,0,0,3" Text="{Binding text}" Height="93"/>
    				</StackPanel>
    			</StackPanel>
    		</Grid>
    	</DataTemplate>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
    	<shell:PhoneApplicationService 
    		Launching="Application_Launching" Closing="Application_Closing" 
    		Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>